//
//  SearchFilterModel.m
//  much
//
//  Created by weijunjie on 2019/1/9.
//  Copyright © 2019年 iOS. All rights reserved.
//

#import "SearchFilterModel.h"

@implementation SearchFilterModel
- (NSString *)orderDir {
    switch (self.orderType) {
        case SearchFilterOrderDESCType:
            return @"DESC";
        case SearchFilterOrderASCType:
            return @"ASC";
        default:
            return nil;
    }
}

- (NSString *)orderField {
    switch (self.orderFieldType) {
        case SearchFilterOrderFieldComprehensiveType:
            return @"COMPREHENSIVE";
            
        case SearchFilterOrderFieldCompositeType:
            return @"COMPOSITE";
            
        case SearchFilterOrderFieldSaleNumberType:
            return @"SALE_NUMBER";
            
        case SearchFilterOrderFieldNewestType:
            return @"NEWEST";
            
        case SearchFilterOrderFieldPriceType:
            return @"PRICE";
            
        case SearchFilterOrderFieldEmployeePriceType:
            return @"EMPLOYEE_PRICE";
        default:
            return @"COMPOSITE";
    }
}

@end
